The invention relates to clustered messaging and more particularly to the consumption of messages in a clustered messaging environment.
A clustered messaging environment typically includes a number of messaging servers and a number of consuming applications. Each messaging server hosts a queue partition which contains messages and each consuming application connects to a messaging server in order to consume one or more messages.
In such a clustered messaging environment with multiple messaging servers, there are a number of situations which can occur.
It is possible for there to be too few consuming applications to enable all messaging servers to have an attached consumer.
It is also possible that although there are numerically sufficient consuming application instances for the number of messaging servers, the consumers are unevenly distributed across a cluster such that some messaging servers do not have a consumer attached.
A messaging server may have a consumer attached but that consumer may be using a filter that causes the consumer to receive only some of the messages at the messaging server.
A messaging server may have a consumer attached but that consumer may be running particularly slowly or at least more slowly than other consumers attached to different messaging servers.
The situations described above all result in messages arriving at those messaging servers remaining unconsumed or not being consumed in a timely manner. These messages are said to be “marooned”.